<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>编辑用户</title>
<!--{ include file="header.html" }-->
<script language="javascript">
function chkAddForm(){
	var UserNickName = $('#UserNickName').val();
	var UserPassword = $('#UserPassword').val();
	var UserMobile = $('#UserMobile').val();
	var UserEmail = $('#UserEmail').val();
	
	if(!UserNickName || !UserPassword || !UserMobile || !UserEmail){
		alert('请完整资料！');
		return false;
	}
}

function changeProvince(pid){
	var sellerCity = $('#SellerCityID');
	var sellerCbd = $('#SellerCBDID');
	if(pid == 0){
		sellerCity.val(0);
		sellerCbd.val(0);
	}
	$.ajax({
	  url: "./index.php?module=user&act=list",
	  type: "POST",
	  dataType: "json",
	  data: "step=ajax_getcity&pid=" + pid,
	  cache: false,
	  success: function(data){
		sellerCity.empty();
		sellerCity.append('<option value="0">--请选择城市--</option>');
		$.each(data, function(i, n){
			sellerCity.append('<option value="'+ n['cid'] +'">'+n['cname']+'</option>');
		})
	  }
	}); 
}
function changeCity(cid){
	var sellerCbd = $('#SellerCBDID');
	if(cid == 0){
		sellerCbd.val(0);
	}
	$.ajax({
	  url: "./index.php?module=user&act=list",
	  type: "POST",
	  dataType: "json",
	  data: "step=ajax_getcbd&cid=" + cid,
	  cache: false,
	  success: function(data){
		sellerCbd.empty();
		sellerCbd.append('<option value="0">--请选择商圈--</option>');
		$.each(data, function(i, n){
			sellerCbd.append('<option value="'+ n['cbdid'] +'">'+n['cbdname']+'</option>');
		})
	  }
	}); 
}
</script>
</head>

<body>
<div align="right"><input type="button" name="addnewseller" value="用户列表" onclick="javascript:window.location.href='./index.php?module=user&act=list';" /></div><br/>
<form name="form_seller_cate_edit" method="post" action="./index.php?module=user&act=list" enctype="multipart/form-data" onSubmit="return chkAddForm();">
<table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#0066FF">
  <tr bgcolor="#96d6f8">
    <td height="20" colspan="2">&nbsp;编辑用户</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="30%" height="20" align="right" bgcolor="#FFFFFF">用户昵称：</td>
    <td><input name="UserNickName" type="text" id="UserNickName" value="<!--{ $info.UserNickName }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="30%" height="20" align="right" bgcolor="#FFFFFF">用户密码：</td>
    <td><input name="UserPassword" type="text" id="UserPassword" value="<!--{ $info.UserPassword }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户手机号码：</td>
    <td><input name="UserMobile" type="text" id="UserMobile" value="<!--{ $info.UserMobile  }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户组：</td>
    <td>
	<select name="UserGroupID[]" id="UserGroupID" multiple="multiple" style="width:150px">
		<!--{foreach name=groups from=$groups item=group}-->
		<option value="<!--{$group.UserGroupID}-->" <!--{if in_array($group.UserGroupID,$info.userGroups)}--> selected <!--{/if}--> >
		<!--{$group.UserGroupName}-->
		</option>
		<!--{/foreach}-->
	</select>
	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户Email：</td>
    <td><input name="UserEmail" type="text" id="UserEmail" value="<!--{ $info.UserEmail }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户性别：</td>
    <td>
	<select name="UserSex" id="UserSex">
		<option value="0" <!--{if 0 == $info.UserSex}--> selected <!--{/if}--> >--请选择性别--</option>
		<option value="1" <!--{if 1 == $info.UserSex}--> selected <!--{/if}--> >男</option>
		<option value="2" <!--{if 2 == $info.UserSex}--> selected <!--{/if}--> >女</option>
	</select>
	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户QQ：</td>
    <td><input name="UserQQ" type="text" id="UserQQ" value="<!--{ $info.UserQQ }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户MSN：</td>
    <td><input name="UserMSN" type="text" id="UserMSN" value="<!--{ $info.UserMSN }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户血型：</td>
    <td>
	<select name="UserBlood" id="UserBlood">
		<option value="O" <!--{if "O" == $info.UserBlood}--> selected <!--{/if}--> >O</option>
		<option value="A" <!--{if "A" == $info.UserBlood}--> selected <!--{/if}--> >A</option>
		<option value="B" <!--{if "B" == $info.UserBlood}--> selected <!--{/if}--> >B</option>
		<option value="AB" <!--{if "AB" == $info.UserBlood}--> selected <!--{/if}--> >AB</option>
	</select>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户出身日期：</td>
    <td><input name="UserBirthday" type="text" id="UserBirthday" value="<!--{ $info.UserBirthday }-->"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户省份：</td>
    <td>
	<select name="UserBirthdayProvince" id="UserBirthdayProvince">
	<option value="0">--请选择省份--</option>
	<!--{foreach name=provinces from=$provinces item=province}-->
	<option value="<!--{$province.pid}-->" <!--{if $province.pid == $info.UserBirthdayProvince}--> selected <!--{/if}--> ><!--{$province.pchar}-->-<!--{$province.pname}-->				    </option>
	<!--{/foreach}-->
	</select>
	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">用户城市：</td>
    <td>
	<select name="UserBirthdayCity" id="UserBirthdayCity">
	<option value="0">--请选择城市--</option>
	<!--{foreach name=cities from=$cities item=city}-->
	<option value="<!--{$city.cid}-->" <!--{if $city.cid == $info.UserBirthdayCity}--> selected <!--{/if}--> ><!--{$city.cname}--></option>
	<!--{/foreach}-->
	</select>
	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" align="right" bgcolor="#FFFFFF">婚姻状况：</td>
    <td>
	<select name="UserMarry" id="UserMarry">
		<option value="1" <!--{if $info.UserMarry == 1}-->selected<!--{/if}--> >单身</option>
		<option value="2" <!--{if $info.UserMarry == 2}-->selected<!--{/if}--> >非单身</option>
	</select>
	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="20" bgcolor="#FFFFFF">&nbsp;</td>
    <td><input type="submit" name="Submit" value="提交">
      <input type="reset" name="Submit" value="重置">
      <input type="hidden" name="step" value="do_edit">
	  <input type="hidden" name="id" value="<!--{$info.UserID}-->" />
      </td>
  </tr>

</table>
</form>
</body>
</html>